﻿using UnityEngine;
using System.Collections;

public class ConnectingTextChanger : MonoBehaviour {

    UILabel mLabel;
	// Use this for initialization
	void Start () {
        mLabel = GetComponent<UILabel>();
        mLabel.text = mText;
	}

    string mText = "Connecting";
    int mDotCount = 0;
	// Update is called once per frame
	void Update () {
	
        if(Time.frameCount % 50 == 0)
        {
            mDotCount++;
            if (mDotCount == 4)
                mDotCount = 0;
            string dotStr = "";
            for (int i = 0; i < mDotCount; i++)
                dotStr += ".";

            mLabel.text = mText + dotStr;
        }
	}
}
